from flask import Flask
from flask import request

app = Flask(__name__)


@app.route('/')
def hello_world():  # put application's code here
    return 'Hello World!'


@app.route('/user/<name>')
def user(name):  # put application's code here
    return 'Hello, {}!'.format(name)


@app.route('/browser')
def show_request():
    user_agent = request.headers.get('User-Agent')
    return 'Your browser is {}'.format(user_agent)


if __name__ == '__main__':
    app.run()
